package com.jrx.anytxn.customer.dto.customer;

import com.jrx.anytxn.common.constant.RegexConstant;
import com.jrx.anytxn.customer.dto.BaseApiReq;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

public class IdValidityReq extends BaseApiReq {
    @NotBlank(message = "证件号不能为空")
    @Pattern(regexp = RegexConstant.ID_NO, message = "身份证号码格式不正确")
    @ApiModelProperty(value="证件号码")
    private String idNumber;

    @NotBlank(message = "证件类型不能为空")
    @ApiModelProperty(value="证件类型")
    private String idType;

    @NotBlank(message = "发证机关不能为空")
    @ApiModelProperty(value="发证机关")
    private String idIssueAgent;

    @NotBlank(message = "证件有效期起始日期不能为空")
    @Pattern(regexp = RegexConstant.DATA_FORMAT, message = "日期格式不对，请正确输入yyyy-MM-dd")
    @ApiModelProperty(value="证件有效期起始日期")
    private String idEffectiveDate;

    @NotBlank(message = "证件有效期终止日期不能为空")
    @ApiModelProperty(value="证件有效期终止日期")
    private String idExpireDate;

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType;
    }

    public String getIdIssueAgent() {
        return idIssueAgent;
    }

    public void setIdIssueAgent(String idIssueAgent) {
        this.idIssueAgent = idIssueAgent;
    }

    public String getIdEffectiveDate() {
        return idEffectiveDate;
    }

    public void setIdEffectiveDate(String idEffectiveDate) {
        this.idEffectiveDate = idEffectiveDate;
    }

    public String getIdExpireDate() {
        return idExpireDate;
    }

    public void setIdExpireDate(String idExpireDate) {
        this.idExpireDate = idExpireDate;
    }

    @Override
    public String toString() {
        return "IdValidity{" +
                "idNumber='" + idNumber + '\'' +
                ", idType='" + idType + '\'' +
                ", idIssueAgent='" + idIssueAgent + '\'' +
                ", idEffectiveDate='" + idEffectiveDate + '\'' +
                ", idExpireDate='" + idExpireDate + '\'' +
                '}';
    }
}
